package com.foreknow.oop.hw8;

/**
 * 工具类
 */
public class Util {
    /**
     * 获得出拳方法名
     * @param punch 出拳Id
     * @return
     */
    public static String getStringPunch(int punch){
        switch (punch){
            case 0:
                return "剪刀";
            case 1:
                return "石头";
            case 2:
                return "布";
        }
        return null;
    }

    /**
     * 获得角色名
     * @param userId 角色Id
     * @return
     */
    public static String getComputerUser(int userId){
        switch (userId){
            case 0:
                return "刘备";
            case 1:
                return "孙权";
            case 2:
                return "曹操";
        }
        return null;
    }

}
